<?php
/**
	*远程上传接口
	*$arr=>array(
		*$to 目标位置,
		*$from 本地文件位置,
		*OSS_BUCKET=>"",其他
	);
*/
switch(UPLOAD_OSS){
	case "aliyun":
		include_once("oos/oss.php");
	break;
}
function oss_upload_file($arr=array()){
	switch(UPLOAD_OSS){
			case "aliyun":
				
				Common::createBucket();
				$bucket = Common::getBucketName();
				$ossClient = Common::getOssClient();
				if (is_null($ossClient)) exit(1);
				$result = $ossClient->uploadFile($arr['bucket'], $arr['to'], $arr['from']); 
				 
				//return $oss->upload_file_by_file($arr['bucket'],$arr['to'],$arr['from']);
				return $result;
				break;
			case "qiniu":
			
				break;
			case "upyun":
			
				break;
			default:
				break;
		}
	}
?>